/*
 * Clock.h
 * 23:54
 *  Created on: 9 бер. 2012
 *      Author: vanok
 */

using namespace std;

class Clock {
public:
void show();
void setClock(int h,int m, int s){
	hour = h;
	min = m;
	sek = s;
};

void tick(){
 sekp();
}

private:
int hour,min,sek;

void sekp(){
	if(sek >= 59){
		sek = 0;
		minp();
	}else sek++;
};
void minp(){
	if(min >= 59){
		min = 0;
		hourp();
	}else min++;
};
void hourp(){
	if(hour >= 23){
		hour = 0;
	}else hour ++;
};
void sw(){
	cout.fill('0');
	cout.width(2);
}
};

void Clock::show(){
	sw(); cout << hour << ":";
	sw(); cout << min <<":";
	sw(); cout << sek << "\r";

	};
